import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main1 {
    public static boolean isAlpha(char ch)
    {
        return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z');
    }
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        while(s.hasNextLine()){
            String str = s.nextLine();
            char[] arr=str.toCharArray();
            for(int i = 0; i < arr.length; ++i)
            {
                if(!isAlpha(arr[i]))
                arr[i] = ' ';
            }
            str=Arrays.toString(arr);
            String[] ss=str.split(" ");
            ss.length;
            System.out.println();
            
        }
        
    }
}